#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
    int m = 0;
    int n = 0;
    scanf("%d %d", &m, &n);
    int count = 0;
    int i = 0;
    for (i = 0; i < 32; i++)
    {
        if ((m >> i & 1) != (n >> i & 1))
        {
            count++;
        }
    }
    printf("%d", count);
    return 0;
}